package com.yzp.service;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * Description
 *
 * @className: OrderTaskServic
 * @author: yanzhouping
 * @date: 2019/9/2 15:16
 */
public class OrderTaskService {
    @Autowired
    private TranTest2Service tranTest2Service;

    /**
     * 订单处理任务
     * @throws InterruptedException
     */
    public void orderTask() throws InterruptedException {

        this.cancelOrder(); // 取消订单
        tranTest2Service.sendMessage1(); // 发短信的方法   1
        tranTest2Service.sendMessage2(); // 发短信的方法  2

    }

    /**
     * 取消订单
     * @throws InterruptedException
     */
    public void cancelOrder() throws InterruptedException {
        System.out.println("取消订单的方法执行------开始");
        System.out.println("取消订单的方法执行------结束 ");
    }
}
